package com.txts.road.app.system.model.dto;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 协议存储表单对象
 *
 * @author baoyr
 * @since 2025-07-17 10:46
 */
@Getter
@Setter
@Schema(description = "协议存储表单对象")
public class AgreementDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "协议ID")
    @NotNull(message = "协议ID不能为空")
    private Integer id;

    @Schema(description = "协议类型：1-用户协议，2-隐私协议，3-其他协议")
    @NotNull(message = "协议类型：1-用户协议，2-隐私协议，3-其他协议不能为空")
    private Integer agreementType;

    @Schema(description = "协议版本号（如：v1.0.0）")
    @NotBlank(message = "协议版本号（如：v1.0.0）不能为空")
    @Size(max=20, message="协议版本号（如：v1.0.0）长度不能超过20个字符")
    private String version;

    @Schema(description = "协议标题")
    @NotBlank(message = "协议标题不能为空")
    @Size(max=100, message="协议标题长度不能超过100个字符")
    private String title;

    @Schema(description = "协议内容（富文本/HTML格式）")
    @NotBlank(message = "协议内容（富文本/HTML格式）不能为空")
    @Size(max=65535, message="协议内容（富文本/HTML格式）长度不能超过65535个字符")
    private String content;

    @Schema(description = "协议pdfurl")
    @Size(max=255, message="协议pdfurl长度不能超过255个字符")
    private String pdfUrl;

    @Schema(description = "是否生效（0-未生效，1-已生效）")
    private Integer isActive;

    @Schema(description = "协议生效时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime effectiveTime;

   


}
